from selenium import webdriver
from selenium.webdriver.common.by import By
import time

driver = webdriver.Chrome()
driver.get('https://www.baidu.com')
driver.maximize_window()

kw = driver.find_element(By.ID,'kw')
print(kw.id)

print(kw.size)
print(kw.rect)

print(kw.tag_name)
print(kw.text)

news = driver.find_element(By.LINK_TEXT,'新闻')
print(news.text)



time.sleep(2)
driver.quit()